package com.qianfeng.openapi.web.master.controller;

import com.qianfeng.openapi.web.master.service.SysUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/11/30
 * @Time: 上午10:54
 */
@RestController
public class EchartsController {

    @Resource
    private SysUserService sysUserService;


    @RequestMapping("/sys/echarts/pie")
    public List<Map<String,Object>>  findPie(){
        return sysUserService.findPibData();
    }

    /**
     *  xAxis: {
     *                 type: 'category',
     *                 data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     *             },
     *
     *             series: [{
     *                 data: [120, 200, 150, 80, 70, 110, 130],
     *                 type: 'bar'
     *             }
     */
    @RequestMapping("/sys/echarts/bar")
    public  Map<String,Object>  barData(){
        return  sysUserService.findBarData();
    }

}
